<?php
require 'vendor/autoload.php';
require './MyCustomSerializer.php';
use Elasticsearch\ClientBuilder;
use MyProject\Serializers\MyCustomSerializer;

$a = 0;
$b = 1;
$c = 2;

$mySerializer = new MyCustomSerializer($a, $b, $c);

$mySerializer->setFoo("bar");

$client = ClientBuilder::create()
    ->setSerializer($mySerializer)
    ->build();


print_r($client);